#ifndef __PET_MANAGER_H__
#define __PET_MANAGER_H__

class Pet;
class PetManager:public manager<Pet,PetId>,public singleton<PetManager>
{
public:
	PetManager();
	virtual ~PetManager();
	virtual Pet* Add(PetId id);
	virtual bool Remove(PetId id);

	void loadPetCSV();
	Pet* CreateFromPetInfo(PetInfo& info);
	Pet* CreateFromCSVId(Int32 csv_id);

	PetCSVInfo* GetPetCSVInfo(Int32 csv_id);
private:
	void GeneratePetInfo(PetCSVInfo& csv_info,PetInfo &info);
	Int32 GetValueMaxMinBetween(Int32 nMax, Int32 nMin);
private:
	CSVReader m_csvReader;
	std::map<Int32,PetCSVInfo> m_mapPetCSV;
};
#endif
